import main

def displayOnlineUsers(lista):
    listPeopleWantToChat=['username']
    print('-------------\nOnline People\n-------------')
    for x in lista:
        print(x)
    print('-------------\n')
    choice=input('Do you want a group chat or a single chat? \nG for group, S for single! \nMake your choice: ')
    if choice == 'S':
        userYouWant=input('Enter the nick of the user you want to chat with: ')
        if userYouWant in lista:
            print('Here will be the chat')
            listPeopleWantToChat.append(userYouWant)
    else:
        usersYouWant=input('Enter the nick of the user you want to chat with: ' )
        if usersYouWant in lista:
            print('fun that will add this nick')
            listPeopleWantToChat.append(usersYouWant)            
        usersYouWant1=input('Enter another nick: ')
        if usersYouWant1 in lista:
            print('add that nick')
            listPeopleWantToChat.append(usersYouWant1)
        wantToContinue=input('Do you want to add someone else? \nYes or No\n')
        while wantToContinue == 'Yes':            
            anotherUser=input('Enter a user: ')
            wantToContinue=input('Do you want to add someone else? \nYes or No\n')
            if anotherUser in lista:
                listPeopleWantToChat.append(anotherUser)
    print("So, let's start")
    return listPeopleWantToChat
            
            
            
            
        
         

#TODO
